[VERTEX]

void main()
{
}


//-----------------------------------------------------------------------------
[GEOMETRY]

layout(points) in;
layout(triangle_strip, max_vertices = 4) out;

out vec2	vTexcoord;

void main()
{
	gl_Position = vec4( -1.0, -1.0, 0.0, 1.0 );
	vTexcoord	= vec2( 0.0, 0.0 );
	EmitVertex();
	
	gl_Position = vec4( -1.0,  1.0, 0.0, 1.0 );
	vTexcoord	= vec2( 0.0, 1.0 );
	EmitVertex();
	
	gl_Position = vec4(  1.0, -1.0, 0.0, 1.0 );
	vTexcoord	= vec2( 1.0, 0.0 );
	EmitVertex();
	
	gl_Position = vec4(  1.0,  1.0, 0.0, 1.0 );
	vTexcoord	= vec2( 1.0, 1.0 );
	EmitVertex();
	
	EndPrimitive();
}


//-----------------------------------------------------------------------------
[FRAGMENT]

uniform sampler2D	unColorTexture;

out vec4	outColor;

in vec2		vTexcoord;

void main()
{
	outColor = vec4( texture( unColorTexture, vTexcoord ).rrr, 1.0 );
}


//-----------------------------------------------------------------------------
[END]
